<template>
  <div class="portalPage">
    <parser :portalConfData="portalConfData"></parser>
  </div>
</template>
<script>
  import {
    getPortalInfo
  } from '@/api/custom/portalDesigner'
  import parser from './parser'
  export default {
    components: {
      parser
    },
    data() {
      return {
        portalConfData: []
      }
    },
    mounted() {
      this.getFormDetail()
    },
    methods: {
      //获取表单详情
      getFormDetail() {
        let path = this.$route.path.split('/')
        getPortalInfo({
          id: path[path.length - 1]
        }).then((res) => {
          if (res.code === 0) {
            this.portalConfData = JSON.parse(res.data.portalJsonMessage)
          }
        }).catch(e => console.log(e))
      },
    }
  }

</script>
<style lang="scss" scoped>
 .portalPage{
   width:100%;
   height:calc(100vh - 84px);
   overflow-y:auto;
   overflow-x:hidden;
   position:absolute;
 }
</style>
